The present invention relates to a semiconductor device and a trace data storing method and relates to, for example, a semiconductor device having a DMA (Direct Memory Access) controller and a trace data storing method in such a semiconductor device.
Japanese Unexamined Patent Application Publication No. 2003-6003 (patent literature 1) discloses a semiconductor integrated circuit having a function module such as a CPU (Central Processing Unit) and a DMA controller. In the patent literature 1, it is written that, in such a semiconductor integrated circuit, to assist debugging of a program and a system, an address and data which is transferred via a bus to which the function module and the DMA controller are coupled is traced.
Concretely, in the patent literature 1, the DMA controller receives a DMA request via a plurality of channels. The DMA controller has arbitration means, and the arbitration means selects one of a plurality of DMA requests received via the plurality of channels in accordance with priorities assigned to the plurality of channels in advance. In the patent literature 1, trace data regarding the DMA request selected by the arbitration means is stored in a trace buffer.